//
//  STMNetworkAPI.h
//  StoreManagement
//
//  Created by centling on 16/5/14.
//  Copyright © 2016年 alfred. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "STMLoginModel.h"
#import "STMShopInfoModel.h"
#import "STMTopGoodsflowModel.h"
#import "STMOrderStatisticsModel.h"
#import "STMOrderManagementListModel.h"
#import "STMGoodsListModel.h"
#import "STMConsultManagementModel.h"
#import "STMStoreRefundModel.h"
#import "STMStoreFlowModel.h"
#import "STMHomePageModel.h"
#import "STMGetCaptchaModel.h"
#import "STMGoodsCategoryModel.h"
#import "STMUploadImageModel.h"
#import "STMGoodsInfoModel.h"

@interface STMNetworkAPI : NSObject

//首页数据获取
+ (void)getHomePageDataWithKey:(NSString *)userKey
                       success:(void (^)(STMHomePageModel *result))success
                       failure:(void (^)(NSError *err))failure;


//登录
+ (void)loginWithUserName:(NSString *)userName
                 password:(NSString *)password
                  success:(void (^)(STMLoginModel *result))success
                  failure:(void (^)(NSError *err))failure;
//退出登录
+ (void)logoutWithKey:(NSString *)userKey
           sellerName:(NSString *)sellerName
               client:(NSString *)client
              success:(void (^)(STMLoginModel *result))success
              failure:(void (^)(NSError *err))failure;

//密码修改
+ (void)modifyPwdWithSellerName:(NSString *)sellerName
                         newPwd:(NSString *)newPwd
                        success:(void (^)(STMLoginModel *result))success
                        failure:(void (^)(NSError *err))failure;


//店铺管理信息获取
+ (void)getShopInfoWithKey:(NSString *)userkey
                   success:(void (^)(STMShopInfoModel *result))success
                   failure:(void (^)(NSError *err))failure;

//店铺管理信息修改
+ (void)shopInfoEditWithKey:(NSString *)userKey
                storeAvatar:(NSData *)avatarData
                         qq:(NSString *)qq
                         ww:(NSString *)ww
                      phone:(NSString *)phone
                    success:(void (^)(STMShopInfoModel *result))success
                    failure:(void (^)(NSError *err))failure;


//TOP10流量获取
+ (void)getTopTenFLowWithKey:(NSString *)userkey
                     success:(void (^)(STMTopGoodsflowModel *result))success
                     failure:(void (^)(NSError *err))failure;

//TOP10下单金额获取
+ (void)getTopTenMoneyAmountWithKey:(NSString *)userkey
                            success:(void (^)(STMTopGoodsflowModel *result))success
                            failure:(void (^)(NSError *err))failure;

//TOP10下单量获取
+ (void)getTopTenOrderAmountWithKey:(NSString *)userkey
                            success:(void (^)(STMTopGoodsflowModel *result))success
                            failure:(void (^)(NSError *err))failure;

//订单统计下单金额获取
+ (void)getOrderAmountWithKey:(NSString *)userkey
                      statype:(NSString *)statype
                      success:(void (^)(STMOrderStatisticsModel *result))success
                      failure:(void (^)(NSError *err))failure;

//订单统计下单量获取
+ (void)getOrderNumWithKey:(NSString *)userkey
                      statype:(NSString *)statype
                      success:(void (^)(STMOrderStatisticsModel *result))success
                      failure:(void (^)(NSError *err))failure;

//订单管理实物订单列表获取
+ (void)getOrderManagementTrueListWithKey:(NSString *)userKey
                        orderType:(NSString *)orderType
                       orderCount:(NSString *)orderCount
                          success:(void (^)(STMOrderManagementListModel *result))success
                          failure:(void (^)(NSError *err))failure;

//商品管理列表
+ (void)getGoodsManagementListWithKey:(NSString *)userKey
                            goodsType:(NSString *)goodsType
                                 page:(NSString *)page
                              success:(void (^)(STMGoodsListModel *result))success
                              failure:(void (^)(NSError *err))failure;

//咨询管理列表
+ (void)getConsultManagementListWithKey:(NSString *)userKey
                                storeId:(NSString *)storeId
                                   type:(NSString *)type
                                   page:(NSString *)page
                                success:(void (^)(STMConsultManagementModel *result))success
                                failure:(void (^)(NSError *err))failure;

//咨询回复
+ (void)consultReplyWithKey:(NSString *)userKey
                    storeId:(NSString *)storeId
                  consultId:(NSString *)consultId
                    content:(NSString *)content
                    success:(void (^)(STMLoginModel *result))success
                    failure:(void (^)(NSError *err))failure;

//退款列表
+ (void)getStoreRefundListWityKey:(NSString *)userKey
                             lock:(NSString *)lock
                            state:(NSString *)state
                             page:(NSString *)page
                          success:(void (^)(STMStoreRefundModel *result))success
                          failure:(void (^)(NSError *err))failure;

//退款审核
+ (void)refundAuditWithKey:(NSString *)userKey
                  refundId:(NSString *)refundId
               sellerState:(NSString *)sellerState
             sellerMessage:(NSString *)sellerMessage
                   success:(void (^)(STMLoginModel *result))success
                   failure:(void (^)(NSError *err))failure;


//退货列表
+ (void)getStoreReturnListWityKey:(NSString *)userKey
                             lock:(NSString *)lock
                            state:(NSString *)state
                             page:(NSString *)page
                          success:(void (^)(STMStoreRefundModel *result))success
                          failure:(void (^)(NSError *err))failure;

//退货审核
+ (void)goodsReturnAuditWithKey:(NSString *)userKey
                       refundId:(NSString *)refundId
                    sellerState:(NSString *)sellerState
                  sellerMessage:(NSString *)sellerMessage
                     returnType:(NSString *)returnType
                        success:(void (^)(STMLoginModel *result))success
                        failure:(void (^)(NSError *err))failure;


//商店流量获取
+ (void)getStoreFlowWithKey:(NSString *)userKey
                   stattype:(NSString *)stattype
                    success:(void (^)(STMStoreFlowModel *result))success
                    failure:(void (^)(NSError *err))failure;


//忘记密码获取验证码
+ (void)getCaptchaWithSellerName:(NSString *)sellerName
                          mobile:(NSString *)mobile
                         success:(void (^)(STMGetCaptchaModel *result))success
                         failure:(void (^)(NSError *err))failure;


//订单发货
+ (void)sendOrderWithKey:(NSString *)userKey
                 orderId:(NSString *)orderId
                 success:(void (^)(STMLoginModel *result))success
                 failure:(void (^)(NSError *err))failure;

//取消订单
+ (void)orderCancelWithKey:(NSString *)userKey
                   orderId:(NSString *)orderId
                    reason:(NSString *)reason
                   success:(void (^)(STMLoginModel *result))success
                   failure:(void (^)(NSError *err))failure;

//修改订单
+ (void)modifyOrderWithKey:(NSString *)userKey
               orderAmount:(NSString *)orderAmount
               goodsAmount:(NSString *)goodsAmount
               shippingFee:(NSString *)shippingFee
                   orderId:(NSString *)orderId
                   success:(void (^)(STMLoginModel *result))success
                   failure:(void (^)(NSError *err))failure;

//禁售商品删除
+ (void)deleteGoodsWithKey:(NSString *)userKey
                  commonId:(NSString *)commonId
                   success:(void (^)(STMLoginModel *result))success
                   failure:(void (^)(NSError *err))failure;

//商品下架
+ (void)unshowGoodsWithKey:(NSString *)userKey
                  commonId:(NSString *)commonId
                   success:(void (^)(STMLoginModel *result))success
                   failure:(void (^)(NSError *err))failure;

//商品上架
+ (void)showGoodsWithKey:(NSString *)userKey
                commonId:(NSString *)commonId
                 success:(void (^)(STMLoginModel *result))success
                 failure:(void (^)(NSError *err))failure;

//发布商品一级类型获取
+ (void)getGoodsCategoryWithKey:(NSString *)userKey
                        success:(void (^)(STMGoodsCategoryModel *result))success
                        failure:(void (^)(NSError *err))failure;


//发布商品二三级类型获取
+ (void)getOtherGoodsCategoryWithKey:(NSString *)userKey
                           firstGCid:(NSString *)firstGCid
                             success:(void (^)(STMGoodsCategoryModel *result))success
                             failure:(void (^)(NSError *err))failure;

//发布商品图片上传
+ (void)uploadImageWithKey:(NSString *)userKey
                     image:(NSData *)image
                   success:(void (^)(STMUploadImageModel *result))success
                   failure:(void (^)(NSError *err))failure;

//商品发布
+ (void)publishGoodsWithKey:(NSString *)userKey
                 imageNames:(NSString *)imageNames
                  goodsName:(NSString *)goodsName
                goodsCateId:(NSString *)goodsCateId
              goodsCateName:(NSString *)goodsCateName
                 goodsPrice:(NSString *)goodsPrice
                marketPrice:(NSString *)marketPrice
                 goodsStore:(NSString *)goodsStore
               goodsFreight:(NSString *)goodsFreight
           goodsDescription:(NSString *)goodsDescription
                    success:(void (^)(STMLoginModel *result))success
                    failure:(void (^)(NSError *err))failure;


//获取商品信息
+ (void)getGoodsInfoWithKey:(NSString *)userKey
                   commonId:(NSString *)commonId
                    success:(void (^)(STMGoodsInfoModel *result))success
                    failure:(void (^)(NSError *err))failure;

//编辑商品保存
+ (void)editGoodsSaveWithKey:(NSString *)userKey
                    commonid:(NSString *)commonid
                  imageNames:(NSString *)imageNames
                   goodsName:(NSString *)goodsName
                 goodsCateId:(NSString *)goodsCateId
               goodsCateName:(NSString *)goodsCateName
                  goodsPrice:(NSString *)goodsPrice
                 marketPrice:(NSString *)marketPrice
                  goodsStore:(NSString *)goodsStore
                goodsFreight:(NSString *)goodsFreight
            goodsDescription:(NSString *)goodsDescription
                     success:(void (^)(STMLoginModel *result))success
                     failure:(void (^)(NSError *err))failure;


@end
